<?php

namespace App\Services\Tbk;

use NiuGengYun\EasyTBK\Factory;
use NiuGengYun\EasyTBK\jingdong\request\JdUnionPromotionByunionidGetRequest;

class JdService
{
    public function index($appid)
    {
        $jd = Factory::jingdong();
        $req = new JdUnionPromotionByunionidGetRequest();
        $url = "https://item.m.jd.com/product/10041046021796.html?utm_term=CopyURL&gx=RnAoFd_4vpxGHxClewztHU4AjGsMsvvCjPY&utm_source=iosapp&utm_campaign=t_335139774&utm_medium=appshare&ad_od=share&gxd=RnAoyzFRazfbmckRroxzCCA86qqchvWEDWm8BvmE8Nswfx1gjjtVMNqGuOjoJpE";
        $req->setMaterialId($url);
        $req->setUnionId($appid);
        $res = $jd->execute($req);
        dd($res);
    }
}
